<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();
Route::get('/home', 'HomeController@index')->name("home");

Route::group(["namespace"=>"Admin","prefix"=>"admin"],function(){
    //新闻相关
    Route::group(["prefix"=>"news"],function(){
        Route::resource("category","NewsCategoryController");
    });
    Route::resource("news","NewsController");

    //权限相关
    Route::resource("permission","PermissionController");
    Route::resource("role","RoleController");
    Route::resource("user","UserController");
});


